import {legacy_createStore as createStore} from 'redux'
import rootReducer from './reducers/root.reducer.js'
import { applyMiddleware } from 'redux'
import todoSaga from './saga/todo.saga'
import createSagaMiddleware from '@redux-saga/core'

const sagaMiddleSaga = createSagaMiddleware()
const store = createStore(rootReducer,applyMiddleware(sagaMiddleSaga))

sagaMiddleSaga.run(todoSaga)


export default store